home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / Security SDK / Includes / CryptoMessageSyntax.h next >
Encoding:
C/C++ Source or Header  |  1999-10-28  |  3.3 KB  |  163 lines  |  [TEXT/CWIE]

  1. /*
  2.      File:        CryptoMessageSyntax.h
  3.  
  4.      Contains:    Apple Cryptographic Message Syntax interfaces.
  5.  
  6.      Version:    1.0
  7.  
  8.      Copyright:    © 1998-1999 by Apple Computer, Inc., all rights reserved
  9.  
  10.      Bugs?:        Please include the the file and version information (from above) with
  11.                  the problem description.  Developers belonging to one of the Apple
  12.                  developer programs can submit bug reports to:
  13.  
  14.                      devsupport@apple.com
  15.  
  16. */
  17. #ifndef __CRYPTOMESSAGESYNTAX__
  18. #define __CRYPTOMESSAGESYNTAX__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __COREFOUNDATION_CFARRAY__
  25. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  26.     #include <:CoreFoundation:CFArray.h>
  27. #else
  28.     #include <CoreFoundation/CFArray.h>
  29. #endif
  30. #endif
  31.  
  32. #ifndef __COREFOUNDATION_CFBAG__
  33. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  34.     #include <:CoreFoundation:CFBag.h>
  35. #else
  36.     #include <CoreFoundation/CFBag.h>
  37. #endif
  38. #endif
  39.  
  40. #ifndef __COREFOUNDATION_CFDATA__
  41. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  42.     #include <:CoreFoundation:CFData.h>
  43. #else
  44.     #include <CoreFoundation/CFData.h>
  45. #endif
  46. #endif
  47.  
  48. #ifndef __COREFOUNDATION_CFDATE__
  49. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  50.     #include <:CoreFoundation:CFDate.h>
  51. #else
  52.     #include <CoreFoundation/CFDate.h>
  53. #endif
  54. #endif
  55.  
  56. #ifndef __COREFOUNDATION_CFSET__
  57. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  58.     #include <:CoreFoundation:CFSet.h>
  59. #else
  60.     #include <CoreFoundation/CFSet.h>
  61. #endif
  62. #endif
  63.  
  64. #ifndef __COREFOUNDATION_CFSTRING__
  65. #if TARGET_OS_MAC && SLASH_INCLUDES_UNSUPPORTED
  66.     #include <:CoreFoundation:CFString.h>
  67. #else
  68.     #include <CoreFoundation/CFString.h>
  69. #endif
  70. #endif
  71.  
  72. #ifndef __KEYCHAIN__
  73. #include <Keychain.h>
  74. #endif
  75.  
  76.  
  77. /*
  78.     Data structures and types
  79. */
  80.  
  81.  
  82. #if PRAGMA_ONCE
  83. #pragma once
  84. #endif
  85.  
  86. #ifdef __cplusplus
  87. extern "C" {
  88. #endif
  89.  
  90. #if PRAGMA_IMPORT
  91. #pragma import on
  92. #endif
  93.  
  94. #if PRAGMA_STRUCT_ALIGN
  95.     #pragma options align=mac68k
  96. #elif PRAGMA_STRUCT_PACKPUSH
  97.     #pragma pack(push, 2)
  98. #elif PRAGMA_STRUCT_PACK
  99.     #pragma pack(2)
  100. #endif
  101.  
  102. typedef struct OpaqueSecTypeRef*         SecTypeRef;
  103. typedef struct OpaqueSecSignerRef*         SecSignerRef;
  104. /* Signer object manipulation */
  105. EXTERN_API( OSStatus )
  106. SecSignerGetStatus                (SecSignerRef             signer);
  107.  
  108. EXTERN_API( SecTypeRef )
  109. SecRetain                        (SecTypeRef             sec);
  110.  
  111. EXTERN_API( void )
  112. SecRelease                        (SecTypeRef             sec);
  113.  
  114. EXTERN_API( UInt32 )
  115. SecRetainCount                    (SecTypeRef             sec);
  116.  
  117. /* Errors Codes  */
  118. enum {
  119.     errSecUnsupported            = -13843,
  120.     errSecInvalidData            = -13844,
  121.     errSecTooMuchData            = -13845,
  122.     errSecMissingData            = -13846,
  123.     errSecNoSigners                = -13847,
  124.     errSecSignerFailed            = -13848,
  125.     errSecInvalidPolicy            = -13849,
  126.     errSecUnknownPolicy            = -13850,
  127.     errSecInvalidStopOn            = -13851,
  128.     errSecMissingCert            = -13852,
  129.     errSecInvalidCert            = -13853,
  130.     errSecNotSigner                = -13854,
  131.     errSecNotTrusted            = -13855,
  132.     errSecMissingAttribute        = -13856,
  133.     errSecMissingDigest            = -13857,
  134.     errSecDigestMismatch        = -13858,
  135.     errSecInvalidSignature        = -13859,
  136.     errSecAlgMismatch            = -13860,
  137.     errSecUnsupportedAlgorithm    = -13864,
  138.     errSecContentTypeMismatch    = -13865,
  139.     errSecDebugRoot                = -13866
  140. };
  141.  
  142.  
  143. #if PRAGMA_STRUCT_ALIGN
  144.     #pragma options align=reset
  145. #elif PRAGMA_STRUCT_PACKPUSH
  146.     #pragma pack(pop)
  147. #elif PRAGMA_STRUCT_PACK
  148.     #pragma pack()
  149. #endif
  150.  
  151. #ifdef PRAGMA_IMPORT_OFF
  152. #pragma import off
  153. #elif PRAGMA_IMPORT
  154. #pragma import reset
  155. #endif
  156.  
  157. #ifdef __cplusplus
  158. }
  159. #endif
  160.  
  161. #endif /* __CRYPTOMESSAGESYNTAX__ */
  162.  
  163.